Make P2P API public (no longer experimental)
authorMatthew Leeds <matthew.leeds@endlessm.com>
Tue, 22 May 2018 22:55:14 +0000 (15:55 -0700)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 4 Jun 2018 19:20:10 +0000 (19:20 +0000)
Currently the API that allows P2P operations (e.g. pulling an ostree ref
from a LAN or USB source) is hidden behind the configure flag
--enable-experimental-api. This commit makes the API public and makes
that flag essentially a no-op (leaving it in place in case we want to
use it again in the future). The P2P API has been tested over the last
several months and proven to work.

This means that since we're no longer using the "experimental" feature
flag, P2P builds of Flatpak will fail when using versions of OSTree from
this commit onwards, until Flatpak is patched in the near future. If you
want to build Flatpak < 0.11.8 with P2P enabled and link against OSTree
2018.6, you'll have to patch Flatpak.  However, since Flatpak won't yet
have a hard dependency on OSTree 2018.6, it needs a new way to determine
if the P2P API in OSTree is available, so this commit adds a "p2p"
feature flag. This way the feature set is more semantically correct than
if we had continued to use the "experimental" feature flag.

In addition to making the P2P API public, this commit makes the P2P unit
tests run by default, removes the f27-experimental CI instance that's no
longer needed, changes a few man pages to reflect the changes, and
updates the bash completion script to accept the new commands and
options.

Closes: #1596
Approved by: cgwalters

48 files changed:
.papr-ex.yaml
.papr.yml
Makefile-libostree-defines.am
Makefile-libostree.am
Makefile-man.am
Makefile-ostree.am
Makefile-tests.am
apidoc/ostree-experimental-sections.txt
apidoc/ostree-sections.txt
bash/ostree
configure.ac
man/ostree-find-remotes.xml
man/ostree-summary.xml
man/ostree.xml
src/libostree/libostree-devel.sym
src/libostree/libostree-experimental.sym [deleted file]
src/libostree/ostree-autocleanups.h
src/libostree/ostree-core-private.h
src/libostree/ostree-core.c
src/libostree/ostree-core.h
src/libostree/ostree-ref.c
src/libostree/ostree-ref.h
src/libostree/ostree-remote-private.h
src/libostree/ostree-remote.c
src/libostree/ostree-remote.h
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-finder-avahi.c
src/libostree/ostree-repo-finder-config.c
src/libostree/ostree-repo-finder-mount.c
src/libostree/ostree-repo-finder-override.c
src/libostree/ostree-repo-finder.c
src/libostree/ostree-repo-finder.h
src/libostree/ostree-repo-private.h
src/libostree/ostree-repo-pull.c
src/libostree/ostree-repo-refs.c
src/libostree/ostree-repo.c
src/libostree/ostree-repo.h
src/libostree/ostree-types.h
src/libostree/ostree.h
src/ostree/main.c
src/ostree/ot-builtin-commit.c
src/ostree/ot-builtin-fsck.c
src/ostree/ot-builtin-init.c
src/ostree/ot-builtin-prune.c
src/ostree/ot-builtin-refs.c
src/ostree/ot-builtin-summary.c
src/ostree/ot-builtins.h
src/ostree/ot-remote-builtin-add.c

index e4370fcfe9af99827b9422f5649f43747095598f..3ebbdb40995cf9bbd0b756f3dde290ee9e48726a 100644 (file)
@@ -81,17 +81,6 @@ tests:
 
 inherit: true
 
-context: f28-experimental-api
-env:
-  CONFIGOPTS: '--enable-experimental-api'
-
-tests:
-  - ci/build-check.sh
-
----
-
-inherit: true
-
 context: f28-minimal
 env:
   CONFIGOPTS: '--without-curl --without-soup --disable-gtk-doc --disable-man
index ab639021e5f5e996747e5e71048dc7c8b8dd442b..b99a1f702e5f376fd9d86514e9a64fd5bb7edc8f 100644 (file)
--- a/.papr.yml
+++ b/.papr.yml
@@ -86,17 +86,6 @@ tests:
 
 inherit: true
 
-context: f28-experimental-api
-env:
-  CONFIGOPTS: '--enable-experimental-api'
-
-tests:
-  - ci/build-check.sh
-
----
-
-inherit: true
-
 context: f28-minimal
 env:
   CONFIGOPTS: '--without-curl --without-soup --disable-gtk-doc --disable-man
index 58f77a2cb05a6d3224df3e0aa83505f3d0676006..77748a41a189391339bb69d988483238081d6d60 100644 (file)
@@ -38,10 +38,6 @@ libostree_public_headers = \
        src/libostree/ostree-deployment.h \
        src/libostree/ostree-bootconfig-parser.h \
        src/libostree/ostree-repo-deprecated.h \
-       $(NULL)
-
-if ENABLE_EXPERIMENTAL_API
-libostree_public_headers += \
        src/libostree/ostree-ref.h \
        src/libostree/ostree-remote.h \
        src/libostree/ostree-repo-finder.h \
@@ -50,7 +46,6 @@ libostree_public_headers += \
        src/libostree/ostree-repo-finder-mount.h \
        src/libostree/ostree-repo-finder-override.h \
        $(NULL)
-endif
 
 # This one is generated via configure.ac, and the gtk-doc
 # code hence needs to look in the builddir.
index 9dc81b2f8321451b62142ec59ac05ac6bb42d340..01a209d15bfaf86da8aa3c6fca9e911782cc2f55 100644 (file)
@@ -140,6 +140,13 @@ libostree_1_la_SOURCES = \
        src/libostree/ostree-gpg-verify-result.c \
        src/libostree/ostree-gpg-verify-result-private.h \
        src/libostree/ostree-autocleanups.h \
+       src/libostree/ostree-bloom.c \
+       src/libostree/ostree-bloom-private.h \
+       src/libostree/ostree-repo-finder.c \
+       src/libostree/ostree-repo-finder-avahi.c \
+       src/libostree/ostree-repo-finder-config.c \
+       src/libostree/ostree-repo-finder-mount.c \
+       src/libostree/ostree-repo-finder-override.c \
        $(NULL)
 if USE_LIBARCHIVE
 libostree_1_la_SOURCES += src/libostree/ostree-libarchive-input-stream.h \
@@ -154,26 +161,13 @@ libostree_1_la_SOURCES += \
        $(NULL)
 endif
 libostree_experimental_headers = \
-       src/libostree/ostree-ref.h \
-       src/libostree/ostree-remote.h \
-       src/libostree/ostree-repo-finder.h \
-       src/libostree/ostree-repo-finder-avahi.h \
-       src/libostree/ostree-repo-finder-config.h \
-       src/libostree/ostree-repo-finder-mount.h \
-       src/libostree/ostree-repo-finder-override.h \
        $(NULL)
 if !ENABLE_EXPERIMENTAL_API
 libostree_1_la_SOURCES += $(libostree_experimental_headers)
 else # if ENABLE_EXPERIMENTAL_API
 libostree_1_la_SOURCES += \
-       src/libostree/ostree-bloom.c \
-       src/libostree/ostree-bloom-private.h \
-       src/libostree/ostree-repo-finder.c \
-       src/libostree/ostree-repo-finder-avahi.c \
-       src/libostree/ostree-repo-finder-config.c \
-       src/libostree/ostree-repo-finder-mount.c \
-       src/libostree/ostree-repo-finder-override.c \
        $(NULL)
+endif
 
 if USE_AVAHI
 libostree_1_la_SOURCES += \
@@ -181,20 +175,15 @@ libostree_1_la_SOURCES += \
        src/libostree/ostree-repo-finder-avahi-private.h \
        $(NULL)
 endif # USE_AVAHI
-endif
 
 symbol_files = $(top_srcdir)/src/libostree/libostree-released.sym
 if BUILDOPT_IS_DEVEL_BUILD
 symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym
 endif
-if ENABLE_EXPERIMENTAL_API
-symbol_files += $(top_srcdir)/src/libostree/libostree-experimental.sym
-endif
 # http://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html
 wl_versionscript_arg = -Wl,--version-script=
 EXTRA_DIST += \
        $(top_srcdir)/src/libostree/libostree-devel.sym \
-       $(top_srcdir)/src/libostree/libostree-experimental.sym \
        $(top_srcdir)/src/libostree/libostree-released.sym \
        $(NULL)
 
@@ -216,12 +205,10 @@ libostree_1_la_CFLAGS += $(OT_DEP_LIBARCHIVE_CFLAGS)
 libostree_1_la_LIBADD += $(OT_DEP_LIBARCHIVE_LIBS)
 endif
 
-if ENABLE_EXPERIMENTAL_API
 if USE_AVAHI
 libostree_1_la_CFLAGS += $(OT_DEP_AVAHI_CFLAGS)
 libostree_1_la_LIBADD += $(OT_DEP_AVAHI_LIBS)
 endif
-endif
 
 if BUILDOPT_LIBSYSTEMD
 libostree_1_la_CFLAGS += $(LIBSYSTEMD_CFLAGS)
index 342af520a393afa62b8fc584e14d07d378cc3827..8ccbba8c6ef0abe42ad1b9c0418777e5af6a3409 100644 (file)
@@ -28,11 +28,12 @@ ostree-admin-status.1 ostree-admin-set-origin.1 ostree-admin-switch.1       \
 ostree-admin-undeploy.1 ostree-admin-upgrade.1 ostree-admin-unlock.1   \
 ostree-admin-pin.1 \
 ostree-admin.1 ostree-cat.1 ostree-checkout.1 ostree-checksum.1                \
-ostree-commit.1 ostree-export.1 ostree-gpg-sign.1 ostree-config.1      \
-ostree-diff.1 ostree-fsck.1 ostree-init.1 ostree-log.1 ostree-ls.1     \
-ostree-prune.1 ostree-pull-local.1 ostree-pull.1 ostree-refs.1         \
-ostree-remote.1 ostree-reset.1 ostree-rev-parse.1 ostree-show.1                \
-ostree-summary.1 ostree-static-delta.1
+ostree-commit.1 ostree-create-usb.1 ostree-export.1 ostree-gpg-sign.1 \
+ostree-config.1 ostree-diff.1 ostree-find-remotes.1 ostree-fsck.1 \
+ostree-init.1 ostree-log.1 ostree-ls.1 ostree-prune.1 ostree-pull-local.1 \
+ostree-pull.1 ostree-refs.1 ostree-remote.1 ostree-reset.1 \
+ostree-rev-parse.1 ostree-show.1 ostree-summary.1 \
+ostree-static-delta.1
 if BUILDOPT_TRIVIAL_HTTPD
 man1_files += ostree-trivial-httpd.1
 else
@@ -44,10 +45,6 @@ if BUILDOPT_FUSE
 man1_files += rofiles-fuse.1
 endif
 
-if ENABLE_EXPERIMENTAL_API
-man1_files += ostree-find-remotes.1 ostree-create-usb.1
-endif
-
 man5_files = ostree.repo.5 ostree.repo-config.5
 
 man1_MANS = $(addprefix man/,$(man1_files))
index 91d8383d89ae326c006943ebea4574c288f088c4..8d352e38fd35a5ab6f9aa499e9f1aa38e2324933 100644 (file)
@@ -29,8 +29,10 @@ ostree_SOURCES = src/ostree/main.c \
        src/ostree/ot-builtin-checkout.c \
        src/ostree/ot-builtin-checksum.c \
        src/ostree/ot-builtin-commit.c \
+       src/ostree/ot-builtin-create-usb.c \
        src/ostree/ot-builtin-diff.c \
        src/ostree/ot-builtin-export.c \
+       src/ostree/ot-builtin-find-remotes.c \
        src/ostree/ot-builtin-fsck.c \
        src/ostree/ot-builtin-gpg-sign.c \
        src/ostree/ot-builtin-init.c \
@@ -60,8 +62,6 @@ nodist_ostree_SOURCES = \
 
 if ENABLE_EXPERIMENTAL_API
 ostree_SOURCES += \
-       src/ostree/ot-builtin-create-usb.c \
-       src/ostree/ot-builtin-find-remotes.c \
        $(NULL)
 endif
 
index 48363b9af6acd0312ea93c59e0597c654b89c4c0..1bdad4c12ec0cd75bfacc7792f4de68dccb1db27 100644 (file)
@@ -54,7 +54,11 @@ dist_uninstalled_test_scripts = tests/test-symbols.sh tests/coccinelle.sh
 # This overrides the glib-tap.mk emphasis on doing both, if we'd
 # used e.g. `dist_test_scripts`.
 dist_test_scripts = $(NULL)
-test_programs = $(NULL)
+test_programs = \
+       tests/test-bloom \
+       tests/test-repo-finder-config \
+       tests/test-repo-finder-mount \
+       $(NULL)
 _installed_or_uninstalled_test_scripts = \
        tests/test-basic.sh \
        tests/test-basic-user.sh \
@@ -119,9 +123,6 @@ _installed_or_uninstalled_test_scripts = \
        tests/test-summary-update.sh \
        tests/test-summary-view.sh \
        tests/test-no-initramfs.sh \
-       $(NULL)
-
-experimental_test_scripts = \
        tests/test-create-usb.sh \
        tests/test-find-remotes.sh \
        tests/test-fsck-collections.sh \
@@ -133,8 +134,12 @@ experimental_test_scripts = \
        tests/test-summary-collections.sh \
        tests/test-pull-collections.sh \
        $(NULL)
+
+experimental_test_scripts = \
+       $(NULL)
 test_extra_programs = \
        tests/get-byte-order \
+       tests/repo-finder-mount \
        $(NULL)
 
 tests_get_byte_order_SOURCES = tests/get-byte-order.c
@@ -147,7 +152,6 @@ tests_repo_finder_mount_LDADD = $(common_tests_ldadd) libostreetest.la
 
 if ENABLE_EXPERIMENTAL_API
 _installed_or_uninstalled_test_scripts += $(experimental_test_scripts)
-test_extra_programs += tests/repo-finder-mount
 else
 EXTRA_DIST += $(experimental_test_scripts)
 endif
@@ -240,17 +244,9 @@ _installed_or_uninstalled_test_programs = tests/test-varint tests/test-ot-unix-u
        tests/test-gpg-verify-result tests/test-checksum tests/test-lzma tests/test-rollsum \
        tests/test-basic-c tests/test-sysroot-c tests/test-pull-c tests/test-repo
 
-if ENABLE_EXPERIMENTAL_API
-test_programs += \
-       tests/test-bloom \
-       tests/test-repo-finder-config \
-       tests/test-repo-finder-mount \
-       $(NULL)
-
 if USE_AVAHI
 test_programs += tests/test-repo-finder-avahi
 endif
-endif
 
 # An interactive tool
 noinst_PROGRAMS += tests/test-rollsum-cli
index 60daaca5096ac076f273bb5d87ee2dfc25aced0d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,101 +0,0 @@
-<SECTION>
-<FILE>ostree-ref</FILE>
-OstreeCollectionRef
-ostree_collection_ref_new
-ostree_collection_ref_dup
-ostree_collection_ref_free
-ostree_collection_ref_hash
-ostree_collection_ref_equal
-OstreeCollectionRefv
-ostree_collection_ref_dupv
-ostree_collection_ref_freev
-<SUBSECTION Standard>
-ostree_collection_ref_get_type
-</SECTION>
-
-<SECTION>
-<FILE>ostree-remote</FILE>
-OstreeRemote
-ostree_remote_ref
-ostree_remote_unref
-ostree_remote_get_name
-ostree_remote_get_url
-<SUBSECTION Standard>
-ostree_remote_get_type
-</SECTION>
-
-<SECTION>
-<FILE>ostree-repo-experimental</FILE>
-ostree_repo_find_remotes_async
-ostree_repo_find_remotes_finish
-ostree_repo_pull_from_remotes_async
-ostree_repo_pull_from_remotes_finish
-ostree_repo_resolve_keyring_for_collection
-OSTREE_REPO_METADATA_REF
-</SECTION>
-
-<SECTION>
-<FILE>ostree-repo-finder</FILE>
-OstreeRepoFinder
-ostree_repo_finder_resolve_async
-ostree_repo_finder_resolve_finish
-ostree_repo_finder_resolve_all_async
-ostree_repo_finder_resolve_all_finish
-OstreeRepoFinderResult
-ostree_repo_finder_result_new
-ostree_repo_finder_result_dup
-ostree_repo_finder_result_free
-ostree_repo_finder_result_compare
-OstreeRepoFinderResultv
-ostree_repo_finder_result_freev
-<SUBSECTION Standard>
-ostree_repo_finder_get_type
-ostree_repo_finder_result_get_type
-</SECTION>
-
-<SECTION>
-<FILE>ostree-repo-finder-avahi</FILE>
-OstreeRepoFinderAvahi
-ostree_repo_finder_avahi_new
-ostree_repo_finder_avahi_start
-ostree_repo_finder_avahi_stop
-<SUBSECTION Standard>
-ostree_repo_finder_avahi_get_type
-</SECTION>
-
-<SECTION>
-<FILE>ostree-repo-finder-config</FILE>
-OstreeRepoFinderConfig
-ostree_repo_finder_config_new
-<SUBSECTION Standard>
-ostree_repo_finder_config_get_type
-</SECTION>
-
-<SECTION>
-<FILE>ostree-repo-finder-mount</FILE>
-OstreeRepoFinderMount
-ostree_repo_finder_mount_new
-<SUBSECTION Standard>
-ostree_repo_finder_mount_get_type
-</SECTION>
-
-<SECTION>
-<FILE>ostree-repo-finder-override</FILE>
-OstreeRepoFinderOverride
-ostree_repo_finder_override_new
-ostree_repo_finder_override_add_uri
-<SUBSECTION Standard>
-ostree_repo_finder_override_get_type
-</SECTION>
-
-<SECTION>
-<FILE>ostree-misc-experimental</FILE>
-ostree_repo_get_collection_id
-ostree_repo_set_collection_id
-ostree_validate_collection_id
-ostree_repo_list_collection_refs
-ostree_repo_remote_list_collection_refs
-ostree_repo_set_collection_ref_immediate
-ostree_repo_transaction_set_collection_ref
-ostree_repo_resolve_collection_ref
-</SECTION>
index ad1db32c61dafba1b787f3fb6c6ebfc54377f2bb..74c1fba0a5a67035ad34143dec5afee0f60bc437 100644 (file)
@@ -558,3 +558,105 @@ OSTREE_TYPE_SYSROOT_UPGRADER
 ostree_sysroot_upgrader_get_type
 ostree_sysroot_upgrader_flags_get_type
 </SECTION>
+
+<SECTION>
+<FILE>ostree-ref</FILE>
+OstreeCollectionRef
+ostree_collection_ref_new
+ostree_collection_ref_dup
+ostree_collection_ref_free
+ostree_collection_ref_hash
+ostree_collection_ref_equal
+OstreeCollectionRefv
+ostree_collection_ref_dupv
+ostree_collection_ref_freev
+<SUBSECTION Standard>
+ostree_collection_ref_get_type
+</SECTION>
+
+<SECTION>
+<FILE>ostree-remote</FILE>
+OstreeRemote
+ostree_remote_ref
+ostree_remote_unref
+ostree_remote_get_name
+ostree_remote_get_url
+<SUBSECTION Standard>
+ostree_remote_get_type
+</SECTION>
+
+<SECTION>
+<FILE>ostree-repo-experimental</FILE>
+ostree_repo_find_remotes_async
+ostree_repo_find_remotes_finish
+ostree_repo_pull_from_remotes_async
+ostree_repo_pull_from_remotes_finish
+ostree_repo_resolve_keyring_for_collection
+OSTREE_REPO_METADATA_REF
+</SECTION>
+
+<SECTION>
+<FILE>ostree-repo-finder</FILE>
+OstreeRepoFinder
+ostree_repo_finder_resolve_async
+ostree_repo_finder_resolve_finish
+ostree_repo_finder_resolve_all_async
+ostree_repo_finder_resolve_all_finish
+OstreeRepoFinderResult
+ostree_repo_finder_result_new
+ostree_repo_finder_result_dup
+ostree_repo_finder_result_free
+ostree_repo_finder_result_compare
+OstreeRepoFinderResultv
+ostree_repo_finder_result_freev
+<SUBSECTION Standard>
+ostree_repo_finder_get_type
+ostree_repo_finder_result_get_type
+</SECTION>
+
+<SECTION>
+<FILE>ostree-repo-finder-avahi</FILE>
+OstreeRepoFinderAvahi
+ostree_repo_finder_avahi_new
+ostree_repo_finder_avahi_start
+ostree_repo_finder_avahi_stop
+<SUBSECTION Standard>
+ostree_repo_finder_avahi_get_type
+</SECTION>
+
+<SECTION>
+<FILE>ostree-repo-finder-config</FILE>
+OstreeRepoFinderConfig
+ostree_repo_finder_config_new
+<SUBSECTION Standard>
+ostree_repo_finder_config_get_type
+</SECTION>
+
+<SECTION>
+<FILE>ostree-repo-finder-mount</FILE>
+OstreeRepoFinderMount
+ostree_repo_finder_mount_new
+<SUBSECTION Standard>
+ostree_repo_finder_mount_get_type
+</SECTION>
+
+<SECTION>
+<FILE>ostree-repo-finder-override</FILE>
+OstreeRepoFinderOverride
+ostree_repo_finder_override_new
+ostree_repo_finder_override_add_uri
+<SUBSECTION Standard>
+ostree_repo_finder_override_get_type
+</SECTION>
+
+<SECTION>
+<FILE>ostree-misc-experimental</FILE>
+ostree_repo_get_collection_id
+ostree_repo_set_collection_id
+ostree_validate_collection_id
+ostree_repo_list_collection_refs
+ostree_repo_remote_list_collection_refs
+ostree_repo_set_collection_ref_immediate
+ostree_repo_transaction_set_collection_ref
+ostree_repo_resolve_collection_ref
+</SECTION>
index 46baa51b23d74230a14f01789b4bd1eb3110714b..f3aef6861f6184703de9c7bfe52b8bace3fd01d9 100644 (file)
@@ -120,12 +120,25 @@ __ostree_compreply_oses() {
     fi
 }
 
+# Find refs associated with the given collection ID under $repo_path.
+__ostree_compreply_collection_refs() {
+    local collection_id=( $1 )
+    refs=$( ostree refs --repo $repo_path --collections $collection_id 2>/dev/null | cut -d ' ' -f 2 | sed -e 's/)$//' )
+    COMPREPLY+=( $( compgen -W "$refs" -- "$cur" ) )
+}
+
 # Find refs under $repo_path.
 __ostree_compreply_refs() {
     refs=$( ostree refs --repo $repo_path 2>/dev/null )
     COMPREPLY+=( $( compgen -W "$refs" -- "$cur" ) )
 }
 
+# Find collection IDs under $repo_path.
+__ostree_compreply_collection_ids() {
+    collection_ids=$( ostree refs --repo $repo_path --collections 2>/dev/null | cut -d ',' -f 1 | sed -e 's/^(//' | sort | uniq )
+    COMPREPLY+=( $( compgen -W "$collection_ids" -- "$cur" ) )
+}
+
 # Find remotes under $repo_path.
 __ostree_compreply_remotes() {
     remotes=$( ostree remote list --repo $repo_path 2> /dev/null )
@@ -410,6 +423,49 @@ _ostree_config() {
     return 0
 }
 
+_ostree_create_usb() {
+    local boolean_options="
+        $main_boolean_options
+        --disable-fsync
+    "
+
+    local options_with_args="
+        --destination-repo
+        --repo
+    "
+
+    local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
+
+    case "$prev" in
+        --destination-repo|--repo)
+            __ostree_compreply_dirs_only
+            return 0
+            ;;
+        $options_with_args_glob )
+            return 0
+            ;;
+    esac
+
+    case "$cur" in
+        -*)
+            local all_options="$boolean_options $options_with_args"
+            __ostree_compreply_all_options
+            ;;
+        *)
+            local argpos=$( __ostree_pos_first_nonflag $( __ostree_to_alternatives "$options_with_args" ) )
+
+            if [ $cword -eq $argpos ]; then
+                __ostree_compreply_dirs_only
+            elif [ $cword -gt $argpos ] && [ $(((cword - argpos) % 2)) -eq 1 ]; then
+                __ostree_compreply_collection_ids
+            elif [ $cword -gt $argpos ] && [ $(((cword - argpos) % 2)) -eq 0 ]; then
+                __ostree_compreply_collection_refs "${words[$cword - 1]}"
+            fi
+    esac
+
+    return 0
+}
+
 _ostree_diff() {
     local boolean_options="
         $main_boolean_options
@@ -495,6 +551,56 @@ _ostree_export() {
     return 0
 }
 
+_ostree_find_remotes() {
+    local boolean_options="
+        $main_boolean_options
+        --disable-fsync
+        --pull
+    "
+
+    local options_with_args="
+        --finders
+        --repo
+    "
+
+    local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
+
+    case "$prev" in
+        --finders)
+            local choices="config lan mount"
+            local config_first="config,lan config,mount config,lan,mount config,mount,lan"
+            local lan_first="lan,config lan,mount lan,config,mount lan,mount,config"
+            local mount_first="mount,config mount,lan mount,lan,config mount,config,lan"
+            COMPREPLY+=( $( compgen -W "$choices $config_first $lan_first $mount_first" -- "$cur" ) )
+            return 0
+            ;;
+        --repo)
+            __ostree_compreply_dirs_only
+            return 0
+            ;;
+        $options_with_args_glob )
+            return 0
+            ;;
+    esac
+
+    case "$cur" in
+        -*)
+            local all_options="$boolean_options $options_with_args"
+            __ostree_compreply_all_options
+            ;;
+        *)
+            local argpos=$( __ostree_pos_first_nonflag $( __ostree_to_alternatives "$options_with_args" ) )
+
+            if [ $cword -ge $argpos ] && [ $(((cword - argpos) % 2)) -eq 0 ]; then
+                __ostree_compreply_collection_ids
+            elif [ $cword -ge $argpos ] && [ $(((cword - argpos) % 2)) -eq 1 ]; then
+                __ostree_compreply_collection_refs "${words[$cword - 1]}"
+            fi
+    esac
+
+    return 0
+}
+
 _ostree_fsck() {
     local boolean_options="
         $main_boolean_options
@@ -576,6 +682,7 @@ _ostree_init() {
     "
 
     local options_with_args="
+        --collection-id
         --mode
         --repo
     "
@@ -839,6 +946,7 @@ _ostree_refs() {
     local boolean_options="
         $main_boolean_options
         --alias -A
+        --collections -c
         --delete
         --list
     "
@@ -878,6 +986,7 @@ _ostree_remote_add() {
     "
 
     local options_with_args="
+        --collection-id
         --contenturl
         --gpg-import
         --repo
@@ -1615,8 +1724,10 @@ _ostree() {
         checksum
         commit
         config
+        create-usb
         diff
         export
+        find-remotes
         fsck
         gpg-sign
         init
index 5fd95da4426bf18619effaa72de737c57677284b..1f6ea34c2b8fd86790f7db60f6db4e54f2076829 100644 (file)
@@ -572,6 +572,9 @@ AM_COND_IF([BUILDOPT_IS_DEVEL_BUILD],
             release_build_type=release)
 OSTREE_FEATURES="$OSTREE_FEATURES $release_build_type"
 
+# P2P API is public in OSTree >= 2018.6
+OSTREE_FEATURES="$OSTREE_FEATURES p2p"
+
 AC_CONFIG_FILES([
 Makefile
 apidoc/Makefile
index 15f5a516473e1b0c5fef0cfd1fe7ebe6664ce6d1..b3796c31b3b3f89d212d6bfaac08aff4ac3de306 100644 (file)
@@ -58,13 +58,11 @@ Boston, MA 02111-1307, USA.
     <refsect1>
         <title>Description</title>
 
-        <!-- FIXME: Reword this when no longer in experimental -->
         <para>
             OSTree has the ability do pulls not just from configured remote
             servers but also from peer computers on the LAN and from mounted
-            filesystems such as USB drives. Currently this requires compiling
-            OSTree with experimental API enabled, and it requires the use of
-            collection IDs and GPG verification.
+            filesystems such as USB drives. This functionality requires the use
+            of collection IDs and GPG verification.
         </para>
         <para>
             The <command>find-remotes</command> command searches for remotes
index d0f9288264e13e3fa0dbf49a2ee0b233a4328e9f..387dacd7977de82ad74db0faea6ec19727808dca 100644 (file)
@@ -84,12 +84,10 @@ Boston, MA 02111-1307, USA.
                         fields to the summary.
                     </para>
 
-                <!-- FIXME: Uncomment this when collection ID support becomes non-experimental.
                 <para>If the repository has a collection ID configured, the
                   <filename>ostree-metadata</filename> branch for that collection ID
                   will also be updated with a new commit containing the given metadata,
                   which will be signed if the summary file is signed.</para>
-                -->
 
                 </listitem>
             </varlistentry>
index f8d3e2fc916d535163f723dff36e7882429d40b2..d1c156659ed8fe1f409f7b4e273a339138f21c80 100644 (file)
@@ -283,14 +283,13 @@ Boston, MA 02111-1307, USA.
                 </para></listitem>
             </varlistentry>
 
-            <!-- FIXME: Uncomment this when it's no longer experimental
             <varlistentry>
                 <term><citerefentry><refentrytitle>ostree-create-usb</refentrytitle><manvolnum>1</manvolnum></citerefentry></term>
 
                 <listitem><para>
                     &nbsp;Put the given refs on an external drive for P2P distribution.
                 </para></listitem>
-            </varlistentry>-->
+            </varlistentry>
 
             <varlistentry>
                 <term><citerefentry><refentrytitle>ostree-diff</refentrytitle><manvolnum>1</manvolnum></citerefentry></term>
@@ -301,14 +300,13 @@ Boston, MA 02111-1307, USA.
                 </para></listitem>
             </varlistentry>
 
-            <!-- FIXME: Uncomment this when it's no longer experimental
             <varlistentry>
                 <term><citerefentry><refentrytitle>ostree-find-remotes</refentrytitle><manvolnum>1</manvolnum></citerefentry></term>
 
                 <listitem><para>
                     &nbsp;Find remotes to serve the given refs.
                 </para></listitem>
-            </varlistentry>-->
+            </varlistentry>
 
             <varlistentry>
                 <term><citerefentry><refentrytitle>ostree-fsck</refentrytitle><manvolnum>1</manvolnum></citerefentry></term>
index 06544bb6237c7a1671b4afea149b5c6bf72eee4a..832ab84c11c152459c45552c78fae51d704be0f5 100644 (file)
 
 /* Add new symbols here.  Release commits should copy this section into -released.sym. */
 LIBOSTREE_2018.6 {
+global:
+  ostree_collection_ref_dup;
+  ostree_collection_ref_dupv;
+  ostree_collection_ref_equal;
+  ostree_collection_ref_free;
+  ostree_collection_ref_freev;
+  ostree_collection_ref_get_type;
+  ostree_collection_ref_hash;
+  ostree_collection_ref_new;
+  ostree_remote_get_name;
+  ostree_remote_get_type;
+  ostree_remote_get_url;
+  ostree_remote_ref;
+  ostree_remote_unref;
+  ostree_repo_find_remotes_async;
+  ostree_repo_find_remotes_finish;
+  ostree_repo_finder_avahi_get_type;
+  ostree_repo_finder_avahi_new;
+  ostree_repo_finder_avahi_start;
+  ostree_repo_finder_avahi_stop;
+  ostree_repo_finder_config_get_type;
+  ostree_repo_finder_config_new;
+  ostree_repo_finder_get_type;
+  ostree_repo_finder_mount_get_type;
+  ostree_repo_finder_mount_new;
+  ostree_repo_finder_override_add_uri;
+  ostree_repo_finder_override_get_type;
+  ostree_repo_finder_override_new;
+  ostree_repo_finder_resolve_all_async;
+  ostree_repo_finder_resolve_all_finish;
+  ostree_repo_finder_resolve_async;
+  ostree_repo_finder_resolve_finish;
+  ostree_repo_finder_result_compare;
+  ostree_repo_finder_result_dup;
+  ostree_repo_finder_result_free;
+  ostree_repo_finder_result_freev;
+  ostree_repo_finder_result_get_type;
+  ostree_repo_finder_result_new;
+  ostree_repo_get_collection_id;
+  ostree_repo_list_collection_refs;
+  ostree_repo_pull_from_remotes_async;
+  ostree_repo_pull_from_remotes_finish;
+  ostree_repo_remote_list_collection_refs;
+  ostree_repo_resolve_collection_ref;
+  ostree_repo_resolve_keyring_for_collection;
+  ostree_repo_set_collection_id;
+  ostree_repo_set_collection_ref_immediate;
+  ostree_repo_transaction_set_collection_ref;
   ostree_repo_traverse_reachable_refs;
   ostree_sysroot_cleanup_prune_repo;
+  ostree_validate_collection_id;
 } LIBOSTREE_2018.5;
 
 /* Stub section for the stable release *after* this development one; don't
diff --git a/src/libostree/libostree-experimental.sym b/src/libostree/libostree-experimental.sym
deleted file mode 100644 (file)
index b83ad1b..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright Â© 2017 Endless Mobile, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors:
- *  - Philip Withnall <withnall@endlessm.com>
- */
-
-/* Symbols in this file are added to the build if OSTree is configured with
- * --enable-experimental-api. They are not stable or officially supported, and
- * might disappear or change in future releases. */
-
-LIBOSTREE_2017.6_EXPERIMENTAL {
-global:
-  ostree_remote_ref;
-  ostree_remote_unref;
-} LIBOSTREE_2017.6;
-
-LIBOSTREE_2017.7_EXPERIMENTAL {
-global:
-  ostree_remote_get_name;
-} LIBOSTREE_2017.6_EXPERIMENTAL;
-
-LIBOSTREE_2017.8_EXPERIMENTAL {
-global:
-  ostree_collection_ref_dup;
-  ostree_collection_ref_dupv;
-  ostree_collection_ref_equal;
-  ostree_collection_ref_free;
-  ostree_collection_ref_freev;
-  ostree_collection_ref_get_type;
-  ostree_collection_ref_hash;
-  ostree_collection_ref_new;
-  ostree_repo_find_remotes_async;
-  ostree_repo_find_remotes_finish;
-  ostree_repo_finder_avahi_get_type;
-  ostree_repo_finder_avahi_new;
-  ostree_repo_finder_avahi_start;
-  ostree_repo_finder_avahi_stop;
-  ostree_repo_finder_config_get_type;
-  ostree_repo_finder_config_new;
-  ostree_repo_finder_get_type;
-  ostree_repo_finder_mount_get_type;
-  ostree_repo_finder_mount_new;
-  ostree_repo_finder_resolve_async;
-  ostree_repo_finder_resolve_all_async;
-  ostree_repo_finder_resolve_all_finish;
-  ostree_repo_finder_resolve_finish;
-  ostree_repo_finder_result_compare;
-  ostree_repo_finder_result_dup;
-  ostree_repo_finder_result_free;
-  ostree_repo_finder_result_freev;
-  ostree_repo_finder_result_get_type;
-  ostree_repo_finder_result_new;
-  ostree_repo_get_collection_id;
-  ostree_repo_list_collection_refs;
-  ostree_repo_pull_from_remotes_async;
-  ostree_repo_pull_from_remotes_finish;
-  ostree_repo_remote_list_collection_refs;
-  ostree_repo_resolve_keyring_for_collection;
-  ostree_repo_set_collection_id;
-  ostree_repo_set_collection_ref_immediate;
-  ostree_repo_transaction_set_collection_ref;
-  ostree_validate_collection_id;
-} LIBOSTREE_2017.7_EXPERIMENTAL;
-
-LIBOSTREE_2017.12_EXPERIMENTAL {
-global:
-  ostree_repo_resolve_collection_ref;
-} LIBOSTREE_2017.8_EXPERIMENTAL;
-
-LIBOSTREE_2017.13_EXPERIMENTAL {
-global:
-  ostree_repo_finder_override_add_uri;
-  ostree_repo_finder_override_get_type;
-  ostree_repo_finder_override_new;
-} LIBOSTREE_2017.12_EXPERIMENTAL;
-
-LIBOSTREE_2017.14_EXPERIMENTAL {
-global:
-  ostree_remote_get_type;
-  ostree_remote_get_url;
-} LIBOSTREE_2017.13_EXPERIMENTAL;
index d1c94410ed3a8d4af8b7b82c567cef0e820aa7bb..ae67872100dcc6188321b75abf8e9f58e39f9c10 100644 (file)
@@ -61,7 +61,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeSysrootUpgrader, g_object_unref)
 
 G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (OstreeRepoCommitTraverseIter, ostree_repo_commit_traverse_iter_clear)
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeCollectionRef, ostree_collection_ref_free)
 G_DEFINE_AUTO_CLEANUP_FREE_FUNC (OstreeCollectionRefv, ostree_collection_ref_freev, NULL)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRemote, ostree_remote_unref)
@@ -72,7 +71,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderMount, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderOverride, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderResult, ostree_repo_finder_result_free)
 G_DEFINE_AUTO_CLEANUP_FREE_FUNC (OstreeRepoFinderResultv, ostree_repo_finder_result_freev, NULL)
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
 #endif
 
index b5f65d08b4a147e3fcb1bf35001afe905b3c64fd..dd2cbc7e6ee7566731c04ad5fd7f81240f1078a3 100644 (file)
@@ -207,10 +207,6 @@ _ostree_raw_file_to_archive_stream (GInputStream       *input,
                                     GCancellable       *cancellable,
                                     GError            **error);
 
-#ifndef OSTREE_ENABLE_EXPERIMENTAL_API
-gboolean ostree_validate_collection_id (const char *collection_id, GError **error);
-#endif /* !OSTREE_ENABLE_EXPERIMENTAL_API */
-
 gboolean
 _ostree_compare_timestamps (const char   *current_rev,
                             guint64       current_ts,
@@ -218,28 +214,4 @@ _ostree_compare_timestamps (const char   *current_rev,
                             guint64       new_ts,
                             GError      **error);
 
-#if (defined(OSTREE_COMPILATION) || GLIB_CHECK_VERSION(2, 44, 0)) && !defined(OSTREE_ENABLE_EXPERIMENTAL_API)
-#include <libglnx.h>
-#include "ostree-ref.h"
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeCollectionRef, ostree_collection_ref_free)
-G_DEFINE_AUTO_CLEANUP_FREE_FUNC (OstreeCollectionRefv, ostree_collection_ref_freev, NULL)
-
-#include "ostree-repo-finder.h"
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinder, g_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderResult, ostree_repo_finder_result_free)
-G_DEFINE_AUTO_CLEANUP_FREE_FUNC (OstreeRepoFinderResultv, ostree_repo_finder_result_freev, NULL)
-
-#include "ostree-repo-finder-avahi.h"
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderAvahi, g_object_unref)
-
-#include "ostree-repo-finder-config.h"
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderConfig, g_object_unref)
-
-#include "ostree-repo-finder-mount.h"
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderMount, g_object_unref)
-
-#include "ostree-repo-finder-override.h"
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderOverride, g_object_unref)
-#endif
-
 G_END_DECLS
index 33d6a48bd828dec1781daabf583250d6817ab23b..080137f3deac4b12bc9211c3f10eef557d283297 100644 (file)
@@ -302,6 +302,7 @@ ostree_validate_remote_name (const char  *remote_name,
  *
  * Returns: %TRUE if @collection_id is a valid collection ID, %FALSE if it is invalid
  *    or %NULL
+ * Since: 2018.6
  */
 gboolean
 ostree_validate_collection_id (const char *collection_id, GError **error)
index b65c9ba93c3a6ef3c5f18d56548e9a4a6f25c047..08b7d451c1f751a0fc56988dc96f1f689060f8d1 100644 (file)
@@ -271,11 +271,9 @@ typedef enum {
  * This is most useful in concert with `OSTREE_COMMIT_META_KEY_REF_BINDING`,
  * as it more strongly binds the commit to the repository and branch.
  *
- * Since: 2017.9
+ * Since: 2018.6
  */
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 #define OSTREE_COMMIT_META_KEY_COLLECTION_BINDING "ostree.collection-binding"
-#endif
 
 _OSTREE_PUBLIC
 const GVariantType *ostree_metadata_variant_type (OstreeObjectType objtype);
@@ -324,10 +322,8 @@ int ostree_cmp_checksum_bytes (const guchar *a, const guchar *b);
 _OSTREE_PUBLIC
 gboolean ostree_validate_rev (const char *rev, GError **error);
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 _OSTREE_PUBLIC
 gboolean ostree_validate_collection_id (const char *collection_id, GError **error);
-#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
 _OSTREE_PUBLIC
 gboolean ostree_validate_remote_name (const char *remote_name, GError **error);
index 9a4104990f00edef8483e0e26b771f4377794a74..34d6724028041e3cf89f04de22262e7a80af2641 100644 (file)
@@ -47,7 +47,7 @@ G_DEFINE_BOXED_TYPE (OstreeCollectionRef, ostree_collection_ref,
  * operations.
  *
  * Returns: (transfer full): a new #OstreeCollectionRef
- * Since: 2017.8
+ * Since: 2018.6
  */
 OstreeCollectionRef *
 ostree_collection_ref_new (const gchar *collection_id,
@@ -73,7 +73,7 @@ ostree_collection_ref_new (const gchar *collection_id,
  * Create a copy of the given @ref.
  *
  * Returns: (transfer full): a newly allocated copy of @ref
- * Since: 2017.8
+ * Since: 2018.6
  */
 OstreeCollectionRef *
 ostree_collection_ref_dup (const OstreeCollectionRef *ref)
@@ -89,7 +89,7 @@ ostree_collection_ref_dup (const OstreeCollectionRef *ref)
  *
  * Free the given @ref.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 void
 ostree_collection_ref_free (OstreeCollectionRef *ref)
@@ -109,7 +109,7 @@ ostree_collection_ref_free (OstreeCollectionRef *ref)
  * @ref must be non-%NULL.
  *
  * Returns: hash value for @ref
- * Since: 2017.8
+ * Since: 2018.6
  */
 guint
 ostree_collection_ref_hash (gconstpointer ref)
@@ -131,7 +131,7 @@ ostree_collection_ref_hash (gconstpointer ref)
  * ref name, and %FALSE otherwise. Both @ref1 and @ref2 must be non-%NULL.
  *
  * Returns: %TRUE if @ref1 and @ref2 are equal, %FALSE otherwise
- * Since: 2017.8
+ * Since: 2018.6
  */
 gboolean
 ostree_collection_ref_equal (gconstpointer ref1,
@@ -152,7 +152,7 @@ ostree_collection_ref_equal (gconstpointer ref1,
  * %NULL.
  *
  * Returns: (transfer full) (array zero-terminated=1): a newly allocated copy of @refs
- * Since: 2017.8
+ * Since: 2018.6
  */
 OstreeCollectionRef **
 ostree_collection_ref_dupv (const OstreeCollectionRef * const *refs)
@@ -178,7 +178,7 @@ ostree_collection_ref_dupv (const OstreeCollectionRef * const *refs)
  * Free the given array of @refs, including freeing all its elements. @refs
  * must be %NULL-terminated; it may be empty, but must not be %NULL.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 void
 ostree_collection_ref_freev (OstreeCollectionRef **refs)
index 7aa57fde03e130b3178cacdbd833a40f81ba9918..8df685edf3cec9d62b2046d837b80a94357cc2a5 100644 (file)
@@ -42,7 +42,7 @@ G_BEGIN_DECLS
  * (@collection_id, @ref_name). For backwards compatibility, @collection_id may be %NULL,
  * indicating a ref name which is not globally unique.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 typedef struct
 {
@@ -82,7 +82,7 @@ void ostree_collection_ref_freev (OstreeCollectionRef **refs);
  * g_auto(OstreeCollectionRefv) refs = NULL;
  * ]|
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 typedef OstreeCollectionRef** OstreeCollectionRefv;
 
index 5cdc5ff3e745a9f85baccd0c9a626e829ab8ca96..061412de7507476081907c032beec3295935bff3 100644 (file)
@@ -60,8 +60,4 @@ G_GNUC_INTERNAL
 OstreeRemote *ostree_remote_new_from_keyfile (GKeyFile    *keyfile,
                                               const gchar *group);
 
-#if (defined(OSTREE_COMPILATION) || GLIB_CHECK_VERSION(2, 44, 0)) && !defined(OSTREE_ENABLE_EXPERIMENTAL_API)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRemote, ostree_remote_unref)
-#endif
-
 G_END_DECLS
index da325d18a37c66cab018c5d515c91bae45e2c70a..2b068e15c148f45632af5e1a4f0282d307e31845 100644 (file)
@@ -50,7 +50,7 @@
  * refs are currently on a remote, or the commits they currently point to. Use
  * #OstreeRepo in combination with an #OstreeRemote to query that information.
  *
- * Since: 2017.6
+ * Since: 2018.6
  */
 
 OstreeRemote *
@@ -119,7 +119,7 @@ ostree_remote_new_from_keyfile (GKeyFile    *keyfile,
  * Increase the reference count on the given @remote.
  *
  * Returns: (transfer full): a copy of @remote, for convenience
- * Since: 2017.6
+ * Since: 2018.6
  */
 OstreeRemote *
 ostree_remote_ref (OstreeRemote *remote)
@@ -138,7 +138,7 @@ ostree_remote_ref (OstreeRemote *remote)
  * Decrease the reference count on the given @remote and free it if the
  * reference count reaches 0.
  *
- * Since: 2017.6
+ * Since: 2018.6
  */
 void
 ostree_remote_unref (OstreeRemote *remote)
@@ -158,11 +158,9 @@ ostree_remote_unref (OstreeRemote *remote)
     }
 }
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 G_DEFINE_BOXED_TYPE(OstreeRemote, ostree_remote,
                     ostree_remote_ref,
                     ostree_remote_unref);
-#endif
 
 /**
  * ostree_remote_get_name:
@@ -173,7 +171,7 @@ G_DEFINE_BOXED_TYPE(OstreeRemote, ostree_remote,
  * arbitrary, string.
  *
  * Returns: remote’s name
- * Since: 2017.7
+ * Since: 2018.6
  */
 const gchar *
 ostree_remote_get_name (OstreeRemote *remote)
@@ -191,7 +189,7 @@ ostree_remote_get_name (OstreeRemote *remote)
  * Get the URL from the remote.
  *
  * Returns: (transfer full): the remote's URL
- * Since: 2017.14
+ * Since: 2018.6
  */
 gchar *
 ostree_remote_get_url (OstreeRemote *remote)
index 285f590066868e37bc971821beff2cdf85506d7c..a785b4e6f888d0bc39cc05e39cdb1423b1aa057b 100644 (file)
@@ -42,12 +42,8 @@ G_BEGIN_DECLS
  * remotes can only be passed around as (reference counted) opaque handles. In
  * future, more API may be added to create and interrogate them.
  *
- * Since: 2017.6
+ * Since: 2018.6
  */
-#ifndef OSTREE_ENABLE_EXPERIMENTAL_API
-/* This is in ostree-types.h otherwise */
-typedef struct OstreeRemote OstreeRemote;
-#endif
 
 _OSTREE_PUBLIC
 GType ostree_remote_get_type (void) G_GNUC_CONST;
index 86ee5e30a6cef3584c8e398830fb5346ce5f188c..8285a1a0c15b74ca13ce24e18b8a34defbba69bb 100644 (file)
@@ -1961,7 +1961,7 @@ ostree_repo_transaction_set_ref (OstreeRepo *self,
  *
  * Multithreading: Since v2017.15 this function is MT safe.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 void
 ostree_repo_transaction_set_collection_ref (OstreeRepo                *self,
@@ -2045,7 +2045,7 @@ ostree_repo_set_alias_ref_immediate (OstreeRepo *self,
  * case where we're creating or overwriting an existing ref.
  *
  * Returns: %TRUE on success, %FALSE otherwise
- * Since: 2017.8
+ * Since: 2018.6
  */
 gboolean
 ostree_repo_set_collection_ref_immediate (OstreeRepo                 *self,
index fcf62048b142610899925c1b1d5477dd33dcbb40..e48b60f4246ae58072084e02f2acdb59b6f0e39c 100644 (file)
@@ -98,7 +98,7 @@
  * and the resolver is used to retrieve information about services advertised by
  * each peer, including the services’ TXT records.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 
 #ifdef HAVE_AVAHI
@@ -1363,7 +1363,7 @@ ostree_repo_finder_avahi_init (OstreeRepoFinderAvahi *self)
  * If @context is %NULL, the current thread-default #GMainContext is used.
  *
  * Returns: (transfer full): a new #OstreeRepoFinderAvahi
- * Since: 2017.8
+ * Since: 2018.6
  */
 OstreeRepoFinderAvahi *
 ostree_repo_finder_avahi_new (GMainContext *context)
@@ -1412,7 +1412,7 @@ ostree_repo_finder_avahi_new (GMainContext *context)
  * #OstreeRepoFinderAvahi instance, or to call it after
  * ostree_repo_finder_avahi_stop().
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 void
 ostree_repo_finder_avahi_start (OstreeRepoFinderAvahi  *self,
@@ -1494,7 +1494,7 @@ static gboolean stop_cb (gpointer user_data);
  * #OstreeRepoFinderAvahi instance, or to call it before
  * ostree_repo_finder_avahi_start().
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 void
 ostree_repo_finder_avahi_stop (OstreeRepoFinderAvahi *self)
index 58cf321c56d64b9ffe19e8f8df3f0d87942266e7..8e617afcaade83f505ee513aa3f89bfdf391f6e7 100644 (file)
@@ -55,7 +55,7 @@
  * intersection is non-empty, that remote is returned as a result. Remotes which
  * do not have their `collection-id` key configured are ignored.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 
 static void ostree_repo_finder_config_iface_init (OstreeRepoFinderInterface *iface);
@@ -233,7 +233,7 @@ ostree_repo_finder_config_iface_init (OstreeRepoFinderInterface *iface)
  * Create a new #OstreeRepoFinderConfig.
  *
  * Returns: (transfer full): a new #OstreeRepoFinderConfig
- * Since: 2017.8
+ * Since: 2018.6
  */
 OstreeRepoFinderConfig *
 ostree_repo_finder_config_new (void)
index 117033dfa4c1710b4f2f1e7221d027dbc3e456f7..864510e54c6500090a0239cd7cac6ffc4256b633 100644 (file)
@@ -67,7 +67,7 @@
  * The volume monitor used to find mounted volumes can be overridden by setting
  * #OstreeRepoFinderMount:monitor. By default, g_volume_monitor_get() is used.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 
 typedef GList/*<owned GObject>*/ ObjectList;
@@ -648,7 +648,7 @@ ostree_repo_finder_mount_class_init (OstreeRepoFinderMountClass *klass)
    *
    * Volume monitor to use to look up mounted volumes when queried.
    *
-   * Since: 2017.8
+   * Since: 2018.6
    */
   g_object_class_install_property (object_class, PROP_MONITOR,
                                    g_param_spec_object ("monitor",
@@ -679,7 +679,7 @@ ostree_repo_finder_mount_iface_init (OstreeRepoFinderInterface *iface)
  * be used.
  *
  * Returns: (transfer full): a new #OstreeRepoFinderMount
- * Since: 2017.8
+ * Since: 2018.6
  */
 OstreeRepoFinderMount *
 ostree_repo_finder_mount_new (GVolumeMonitor *monitor)
index 0ee0270dae2f8b7f69b68c07e54871f7e1d46087..6917dbe0480e6c35c7330ef2eadc02506b3e9e0e 100644 (file)
@@ -60,7 +60,7 @@
  * which uses #OstreeRepoFinder. For production use, #OstreeRepoFinderConfig is
  * recommended instead.
  *
- * Since: 2017.13
+ * Since: 2018.6
  */
 
 static void ostree_repo_finder_override_iface_init (OstreeRepoFinderInterface *iface);
@@ -295,7 +295,7 @@ ostree_repo_finder_override_iface_init (OstreeRepoFinderInterface *iface)
  * Create a new #OstreeRepoFinderOverride.
  *
  * Returns: (transfer full): a new #OstreeRepoFinderOverride
- * Since: 2017.13
+ * Since: 2018.6
  */
 OstreeRepoFinderOverride *
 ostree_repo_finder_override_new (void)
@@ -310,7 +310,7 @@ ostree_repo_finder_override_new (void)
  * Add the given @uri to the set of URIs which the repo finder will search for
  * matching refs when ostree_repo_finder_resolve_async() is called on it.
  *
- * Since: 2017.13
+ * Since: 2018.6
  */
 void
 ostree_repo_finder_override_add_uri (OstreeRepoFinderOverride *self,
index e7943c3eb28332339855a9b8cc71bbcde3b20dd0..32407ff53e20508f86718dfa5f787cb5186bc527 100644 (file)
@@ -138,7 +138,7 @@ static void resolve_cb (GObject      *obj,
  * Pass the results to ostree_repo_pull_from_remotes_async() to pull the given
  * @refs from those remotes.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 void
 ostree_repo_finder_resolve_async (OstreeRepoFinder                  *self,
@@ -196,7 +196,7 @@ resolve_cb (GObject      *obj,
  *
  * Returns: (transfer full) (element-type OstreeRepoFinderResult): array of zero
  *    or more results
- * Since: 2017.8
+ * Since: 2018.6
  */
 GPtrArray *
 ostree_repo_finder_resolve_finish (OstreeRepoFinder  *self,
@@ -254,7 +254,7 @@ static void resolve_all_finished_one (GTask *task);
  * A version of ostree_repo_finder_resolve_async() which queries one or more
  * @finders in parallel and combines the results.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 void
 ostree_repo_finder_resolve_all_async (OstreeRepoFinder * const          *finders,
@@ -411,7 +411,7 @@ resolve_all_finished_one (GTask *task)
  *
  * Returns: (transfer full) (element-type OstreeRepoFinderResult): array of zero
  *    or more results
- * Since: 2017.8
+ * Since: 2018.6
  */
 GPtrArray *
 ostree_repo_finder_resolve_all_finish (GAsyncResult  *result,
@@ -446,7 +446,7 @@ G_DEFINE_BOXED_TYPE (OstreeRepoFinderResult, ostree_repo_finder_result,
  * are as described in the #OstreeRepoFinderResult documentation.
  *
  * Returns: (transfer full): a new #OstreeRepoFinderResult
- * Since: 2017.8
+ * Since: 2018.6
  */
 OstreeRepoFinderResult *
 ostree_repo_finder_result_new (OstreeRemote     *remote,
@@ -480,7 +480,7 @@ ostree_repo_finder_result_new (OstreeRemote     *remote,
  * Copy an #OstreeRepoFinderResult.
  *
  * Returns: (transfer full): a newly allocated copy of @result
- * Since: 2017.8
+ * Since: 2018.6
  */
 OstreeRepoFinderResult *
 ostree_repo_finder_result_dup (OstreeRepoFinderResult *result)
@@ -502,7 +502,7 @@ ostree_repo_finder_result_dup (OstreeRepoFinderResult *result)
  *
  * Returns: <0 if @a is ordered before @b, 0 if they are ordered equally,
  *    >0 if @b is ordered before @a
- * Since: 2017.8
+ * Since: 2018.6
  */
 gint
 ostree_repo_finder_result_compare (const OstreeRepoFinderResult *a,
@@ -549,7 +549,7 @@ ostree_repo_finder_result_compare (const OstreeRepoFinderResult *a,
  *
  * Free the given @result.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 void
 ostree_repo_finder_result_free (OstreeRepoFinderResult *result)
@@ -571,7 +571,7 @@ ostree_repo_finder_result_free (OstreeRepoFinderResult *result)
  *
  * Free the given @results array, freeing each element and the container.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 void
 ostree_repo_finder_result_freev (OstreeRepoFinderResult **results)
index e622c9a61cba4ccf96b66f9a598c8bbc6df7c650..7c9be300a68298303ff5fd82d7af5821d04b3ebf 100644 (file)
@@ -133,7 +133,7 @@ GPtrArray *ostree_repo_finder_resolve_all_finish (GAsyncResult  *result,
  * ostree_repo_find_remotes_async (2) there was an error in trying to get the
  * commit metadata (3) the checksum for this ref is %NULL in @ref_to_checksum.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 typedef struct
 {
@@ -176,7 +176,7 @@ void ostree_repo_finder_result_free (OstreeRepoFinderResult *result);
  * g_auto(OstreeRepoFinderResultv) results = NULL;
  * ]|
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 typedef OstreeRepoFinderResult** OstreeRepoFinderResultv;
 
index 77203638e863be8a9ae175684591d2f650d7afbe..63aa451ab4ab7e99aaea9f07184e54f65dcb1154 100644 (file)
@@ -460,33 +460,4 @@ OstreeRepoAutoLock * _ostree_repo_auto_lock_push (OstreeRepo          *self,
 void          _ostree_repo_auto_lock_cleanup (OstreeRepoAutoLock *lock);
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoAutoLock, _ostree_repo_auto_lock_cleanup)
 
-#ifndef OSTREE_ENABLE_EXPERIMENTAL_API
-
-/* These APIs are duplicated in the public headers when doing an
- * experimental-API build.
- */
-const gchar * ostree_repo_get_collection_id (OstreeRepo   *self);
-gboolean      ostree_repo_set_collection_id (OstreeRepo   *self,
-                                             const gchar  *collection_id,
-                                             GError      **error);
-
-gboolean      ostree_repo_list_collection_refs (OstreeRepo                  *self,
-                                                const char                  *match_collection_id,
-                                                GHashTable                 **out_all_refs,
-                                                OstreeRepoListRefsExtFlags   flags,
-                                                GCancellable                *cancellable,
-                                                GError                     **error);
-
-void          ostree_repo_transaction_set_collection_ref (OstreeRepo                *self,
-                                                          const OstreeCollectionRef *ref,
-                                                          const char                *checksum);
-
-gboolean      ostree_repo_set_collection_ref_immediate (OstreeRepo                 *self,
-                                                        const OstreeCollectionRef  *ref,
-                                                        const char                 *checksum,
-                                                        GCancellable               *cancellable,
-                                                        GError                    **error);
-
-#endif  /* !OSTREE_ENABLE_EXPERIMENTAL_API */
-
 G_END_DECLS
index 550a33de7b87579269e1df65db81e81ca4a1015f..9553272e854fbd3c70bc27914412d126306138f9 100644 (file)
 #include "ostree-remote-private.h"
 #include "ot-fs-utils.h"
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 #include "ostree-repo-finder.h"
 #include "ostree-repo-finder-config.h"
 #include "ostree-repo-finder-mount.h"
 #ifdef HAVE_AVAHI
 #include "ostree-repo-finder-avahi.h"
 #endif  /* HAVE_AVAHI */
-#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
 #include <gio/gunixinputstream.h>
 #include <sys/statvfs.h>
@@ -904,15 +902,11 @@ fetch_ref_contents (OtPullData                 *pull_data,
 
   if (pull_data->remote_repo_local != NULL && ref->collection_id != NULL)
     {
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
       if (!ostree_repo_resolve_collection_ref (pull_data->remote_repo_local,
                                                ref, FALSE,
                                                OSTREE_REPO_RESOLVE_REV_EXT_NONE,
                                                &ret_contents, cancellable, error))
         return FALSE;
-#else  /* if !OSTREE_ENABLE_EXPERIMENTAL_API */
-      g_assert_not_reached ();
-#endif  /* !OSTREE_ENABLE_EXPERIMENTAL_API */
     }
   else if (pull_data->remote_repo_local != NULL)
     {
@@ -1586,7 +1580,6 @@ _ostree_repo_verify_bindings (const char  *collection_id,
 
   if (collection_id != NULL)
     {
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
       const char *collection_id_binding;
       if (!g_variant_lookup (metadata,
                              OSTREE_COMMIT_META_KEY_COLLECTION_BINDING,
@@ -1601,14 +1594,11 @@ _ostree_repo_verify_bindings (const char  *collection_id,
                            "metadata, while the remote it came from has "
                            "collection ID â€˜%s’",
                            collection_id_binding, collection_id);
-#endif
     }
 
   return TRUE;
 }
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
-
 /* Reads the collection-id of a given remote from the repo
  * configuration.
  */
@@ -1692,7 +1682,7 @@ check_remote_matches_collection_id (OstreeRepo  *repo,
  *
  * Returns: (transfer full): #OstreeRemote containing the GPG keyring for
  *    @collection_id
- * Since: 2017.8
+ * Since: 2018.6
  */
 OstreeRemote *
 ostree_repo_resolve_keyring_for_collection (OstreeRepo    *self,
@@ -1763,8 +1753,6 @@ ostree_repo_resolve_keyring_for_collection (OstreeRepo    *self,
     }
 }
 
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
-
 #ifdef HAVE_LIBCURL_OR_LIBSOUP
 
 /* Look at a commit object, and determine whether there are
@@ -1822,9 +1810,7 @@ scan_commit_object (OtPullData                 *pull_data,
    * branch, otherwise we requested a commit checksum without specifying a branch.
    */
   g_autofree char *remote_collection_id = NULL;
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
   remote_collection_id = get_remote_repo_collection_id (pull_data);
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
   if (!_ostree_repo_verify_bindings (remote_collection_id,
                                      (ref != NULL) ? ref->ref_name : NULL,
                                      commit, error))
@@ -4619,8 +4605,6 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
   return ret;
 }
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
-
 /* Structure used in ostree_repo_find_remotes_async() which stores metadata
  * about a given OSTree commit. This includes the metadata from the commit
  * #GVariant, plus some working state which is used to work out which remotes
@@ -4903,7 +4887,7 @@ static void find_remotes_cb (GObject      *obj,
  *
  * This will use the thread-default #GMainContext, but will not iterate it.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 void
 ostree_repo_find_remotes_async (OstreeRepo                     *self,
@@ -5639,7 +5623,7 @@ error:
  * Returns: (transfer full) (array zero-terminated=1): a potentially empty array
  *    of #OstreeRepoFinderResults, followed by a %NULL terminator element; or
  *    %NULL on error
- * Since: 2017.8
+ * Since: 2018.6
  */
 OstreeRepoFinderResult **
 ostree_repo_find_remotes_finish (OstreeRepo    *self,
@@ -5719,7 +5703,7 @@ copy_option (GVariantDict       *master_options,
  *     milliseconds, if any; only values higher than 0 are valid
  *   * `append-user-agent` (`s`): Additional string to append to the user agent
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 void
 ostree_repo_pull_from_remotes_async (OstreeRepo                           *self,
@@ -5920,7 +5904,7 @@ ostree_repo_pull_from_remotes_async (OstreeRepo                           *self,
  * ostree_repo_pull_from_remotes_async().
  *
  * Returns: %TRUE on success, %FALSE otherwise
- * Since: 2017.8
+ * Since: 2018.6
  */
 gboolean
 ostree_repo_pull_from_remotes_finish (OstreeRepo    *self,
@@ -5935,8 +5919,6 @@ ostree_repo_pull_from_remotes_finish (OstreeRepo    *self,
   return g_task_propagate_boolean (G_TASK (result), error);
 }
 
-#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
-
 /**
  * ostree_repo_remote_fetch_summary_with_options:
  * @self: Self
@@ -6089,8 +6071,6 @@ ostree_repo_remote_fetch_summary_with_options (OstreeRepo    *self,
   return FALSE;
 }
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
-
 void
 ostree_repo_find_remotes_async (OstreeRepo                        *self,
                                 const OstreeCollectionRef * const *refs,
@@ -6158,6 +6138,4 @@ ostree_repo_pull_from_remotes_finish (OstreeRepo    *self,
   return FALSE;
 }
 
-#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
-
 #endif /* HAVE_LIBCURL_OR_LIBSOUP */
index ad0fd57c69848b7ea8ed259d7f7c7cd8ce9fba7b..d10e302e357a76ce3c5f16dad2178781f990f95c 100644 (file)
@@ -470,7 +470,6 @@ ostree_repo_resolve_rev_ext (OstreeRepo                    *self,
   return _ostree_repo_resolve_rev_internal (self, refspec, allow_noent, FALSE, out_rev, error);
 }
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 /**
  * ostree_repo_resolve_collection_ref:
  * @self: an #OstreeRepo
@@ -494,7 +493,7 @@ ostree_repo_resolve_rev_ext (OstreeRepo                    *self,
  * There are currently no @flags which affect the behaviour of this function.
  *
  * Returns: %TRUE on success, %FALSE on failure
- * Since: 2017.12
+ * Since: 2018.6
  */
 gboolean
 ostree_repo_resolve_collection_ref (OstreeRepo                    *self,
@@ -531,7 +530,6 @@ ostree_repo_resolve_collection_ref (OstreeRepo                    *self,
     *out_rev = g_strdup (ret_contents);
   return TRUE;
 }
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
 static gboolean
 enumerate_refs_recurse (OstreeRepo    *repo,
@@ -876,7 +874,6 @@ ostree_repo_remote_list_refs (OstreeRepo       *self,
   return TRUE;
 }
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 static gboolean
 remote_list_collection_refs_process_refs (OstreeRepo   *self,
                                           const gchar  *remote_name,
@@ -934,7 +931,7 @@ remote_list_collection_refs_process_refs (OstreeRepo   *self,
  * Any refs for other collections stored in the repository will also be returned.
  * No filtering is performed.
  *
- * Since: 2017.10
+ * Since: 2018.6
  */
 gboolean
 ostree_repo_remote_list_collection_refs (OstreeRepo    *self,
@@ -995,7 +992,6 @@ ostree_repo_remote_list_collection_refs (OstreeRepo    *self,
   ot_transfer_out_value (out_all_refs, &ret_all_refs);
   return TRUE;
 }
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
 static char *
 relative_symlink_to (const char *relpath,
@@ -1206,7 +1202,7 @@ _ostree_repo_update_collection_refs (OstreeRepo        *self,
  * %OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES in @flags.
  *
  * Returns: %TRUE on success, %FALSE otherwise
- * Since: 2017.8
+ * Since: 2018.6
  */
 gboolean
 ostree_repo_list_collection_refs (OstreeRepo                 *self,
index 43c187671cda51e47dad5cdde8495f161755e25e..52784b4c11d8da52bcced2ef40825c09f89f652e 100644 (file)
@@ -5702,7 +5702,7 @@ _ostree_repo_memory_cache_ref_destroy (OstreeRepoMemoryCacheRef *state)
  * Get the collection ID of this repository. See [collection IDs][collection-ids].
  *
  * Returns: (nullable): collection ID for the repository
- * Since: 2017.8
+ * Since: 2018.6
  */
 const gchar *
 ostree_repo_get_collection_id (OstreeRepo *self)
@@ -5723,7 +5723,7 @@ ostree_repo_get_collection_id (OstreeRepo *self)
  * configuration on disk using ostree_repo_write_config().
  *
  * Returns: %TRUE on success, %FALSE otherwise
- * Since: 2017.8
+ * Since: 2018.6
  */
 gboolean
 ostree_repo_set_collection_id (OstreeRepo   *self,
index d86d241e35106f93417a1921a8abed065dc8e97f..60fa3d3ebd593b56f299ced8ad6d9812ef847c98 100644 (file)
 #include "ostree-core.h"
 #include "ostree-types.h"
 #include "ostree-async-progress.h"
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 #include "ostree-ref.h"
 #include "ostree-repo-finder.h"
-#endif
 #include "ostree-sepolicy.h"
 #include "ostree-gpg-verify-result.h"
 
@@ -107,8 +105,6 @@ OstreeRepo *  ostree_repo_create_at (int             dfd,
                                      GCancellable   *cancellable,
                                      GError        **error);
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
-
 _OSTREE_PUBLIC
 const gchar * ostree_repo_get_collection_id (OstreeRepo   *self);
 _OSTREE_PUBLIC
@@ -116,8 +112,6 @@ gboolean      ostree_repo_set_collection_id (OstreeRepo   *self,
                                              const gchar  *collection_id,
                                              GError      **error);
 
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
-
 _OSTREE_PUBLIC
 GFile *       ostree_repo_get_path (OstreeRepo  *self);
 
@@ -339,15 +333,11 @@ void          ostree_repo_transaction_set_ref     (OstreeRepo *self,
                                                    const char *ref,
                                                    const char *checksum);
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
-
 _OSTREE_PUBLIC
 void          ostree_repo_transaction_set_collection_ref (OstreeRepo                *self,
                                                           const OstreeCollectionRef *ref,
                                                           const char                *checksum);
 
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
-
 _OSTREE_PUBLIC
 gboolean      ostree_repo_set_ref_immediate (OstreeRepo *self,
                                              const char *remote,
@@ -364,8 +354,6 @@ gboolean      ostree_repo_set_alias_ref_immediate (OstreeRepo *self,
                                                    GCancellable  *cancellable,
                                                    GError       **error);
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
-
 _OSTREE_PUBLIC
 gboolean      ostree_repo_set_collection_ref_immediate (OstreeRepo                 *self,
                                                         const OstreeCollectionRef  *ref,
@@ -373,8 +361,6 @@ gboolean      ostree_repo_set_collection_ref_immediate (OstreeRepo
                                                         GCancellable               *cancellable,
                                                         GError                    **error);
 
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
-
 _OSTREE_PUBLIC
 gboolean      ostree_repo_has_object (OstreeRepo           *self,
                                       OstreeObjectType      objtype,
@@ -479,7 +465,6 @@ gboolean      ostree_repo_resolve_rev_ext (OstreeRepo                    *self,
                                            char                         **out_rev,
                                            GError                       **error);
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 _OSTREE_PUBLIC
 gboolean      ostree_repo_resolve_collection_ref (OstreeRepo                    *self,
                                                   const OstreeCollectionRef     *ref,
@@ -488,7 +473,6 @@ gboolean      ostree_repo_resolve_collection_ref (OstreeRepo
                                                   char                         **out_rev,
                                                   GCancellable                  *cancellable,
                                                   GError                       **error);
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
 _OSTREE_PUBLIC
 gboolean      ostree_repo_list_refs (OstreeRepo       *self,
@@ -524,14 +508,12 @@ gboolean ostree_repo_remote_list_refs (OstreeRepo       *self,
                                        GCancellable     *cancellable,
                                        GError          **error);
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 _OSTREE_PUBLIC
 gboolean ostree_repo_remote_list_collection_refs (OstreeRepo    *self,
                                                   const char    *remote_name,
                                                   GHashTable   **out_all_refs,
                                                   GCancellable  *cancellable,
                                                   GError       **error);
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
 _OSTREE_PUBLIC
 gboolean      ostree_repo_load_variant (OstreeRepo  *self,
@@ -1265,8 +1247,6 @@ gboolean ostree_repo_pull_with_options (OstreeRepo             *self,
                                         GCancellable           *cancellable,
                                         GError                **error);
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
-
 _OSTREE_PUBLIC
 void ostree_repo_find_remotes_async (OstreeRepo                         *self,
                                      const OstreeCollectionRef * const  *refs,
@@ -1308,8 +1288,6 @@ gboolean ostree_repo_list_collection_refs (OstreeRepo                 *self,
                                            GCancellable               *cancellable,
                                            GError                     **error);
 
-#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
-
 _OSTREE_PUBLIC
 void ostree_repo_pull_default_console_progress_changed (OstreeAsyncProgress *progress,
                                                         gpointer             user_data);
@@ -1394,8 +1372,6 @@ gboolean ostree_repo_regenerate_summary (OstreeRepo     *self,
                                          GCancellable   *cancellable,
                                          GError        **error);
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
-
 /**
  * OSTREE_REPO_METADATA_REF:
  *
@@ -1415,12 +1391,10 @@ gboolean ostree_repo_regenerate_summary (OstreeRepo     *self,
  * keys must be namespaced by product or developer. For example,
  * `exampleos.end-of-life`. The `ostree.` prefix is reserved.
  *
- * Since: 2017.8
+ * Since: 2018.6
  */
 #define OSTREE_REPO_METADATA_REF "ostree-metadata"
 
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
-
 G_END_DECLS
 
 
index 852eb82b2f41600b4fc8c60d2e2a9f46ae10a30d..bbc6ca64ffa8417893a609a6c7d0f775b308a3d9 100644 (file)
@@ -38,9 +38,6 @@ typedef struct OstreeSysroot OstreeSysroot;
 typedef struct OstreeSysrootUpgrader OstreeSysrootUpgrader;
 typedef struct OstreeMutableTree OstreeMutableTree;
 typedef struct OstreeRepoFile OstreeRepoFile;
-
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 typedef struct OstreeRemote OstreeRemote;
-#endif
 
 G_END_DECLS
index 793d04f0d7984f218f785dad4ccd8a6084e12be3..cbeb99b24638a77b79b37aab88da64b3e45efba4 100644 (file)
@@ -25,9 +25,7 @@
 #include <ostree-core.h>
 #include <ostree-repo.h>
 #include <ostree-mutable-tree.h>
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 #include <ostree-remote.h>
-#endif
 #include <ostree-repo-file.h>
 #include <ostree-sysroot.h>
 #include <ostree-sysroot-upgrader.h>
 #include <ostree-bootconfig-parser.h>
 #include <ostree-diff.h>
 #include <ostree-gpg-verify-result.h>
-
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 #include <ostree-ref.h>
 #include <ostree-repo-finder.h>
 #include <ostree-repo-finder-avahi.h>
 #include <ostree-repo-finder-config.h>
 #include <ostree-repo-finder-mount.h>
 #include <ostree-repo-finder-override.h>
-#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
-
 #include <ostree-autocleanups.h>
 #include <ostree-version.h>
index 9ed0f88010416ac01f5e30cd418996af27c07462..c5b45012f83fc8d0cf39ef6d2e8709677dd2fd47 100644 (file)
@@ -63,14 +63,12 @@ static OstreeCommand commands[] = {
   { "export", OSTREE_BUILTIN_FLAG_NONE,
     ostree_builtin_export,
     "Stream COMMIT to stdout in tar format" },
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
   { "find-remotes", OSTREE_BUILTIN_FLAG_NONE,
     ostree_builtin_find_remotes,
     "Find remotes to serve the given refs" },
   { "create-usb", OSTREE_BUILTIN_FLAG_NONE,
     ostree_builtin_create_usb,
     "Copy the refs to a USB stick" },
-#endif
   { "fsck", OSTREE_BUILTIN_FLAG_NONE,
     ostree_builtin_fsck,
     "Check the repository for consistency" },
index 370f0e5bff711e652c40246e4ae88893276817bc..c2f78700807e6b7c260086b3aef2ae0338d18b72 100644 (file)
@@ -331,7 +331,6 @@ parse_keyvalue_strings (GVariantBuilder   *builder,
   return TRUE;
 }
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 static void
 add_collection_binding (OstreeRepo       *repo,
                         GVariantBuilder  *metadata_builder)
@@ -344,7 +343,6 @@ add_collection_binding (OstreeRepo       *repo,
   g_variant_builder_add (metadata_builder, "{s@v}", OSTREE_COMMIT_META_KEY_COLLECTION_BINDING,
                          g_variant_new_variant (g_variant_new_string (collection_id)));
 }
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
 static int
 compare_strings (gconstpointer a, gconstpointer b)
@@ -383,13 +381,11 @@ fill_bindings (OstreeRepo    *repo,
 
   add_ref_binding (metadata_builder);
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
   /* Allow the collection ID to be overridden using
    * --add-metadata-string=ostree.collection-binding=blah */
   if (metadata == NULL ||
       !g_variant_lookup (metadata, OSTREE_COMMIT_META_KEY_COLLECTION_BINDING, "*", NULL))
     add_collection_binding (repo, metadata_builder);
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
   *out_metadata = g_variant_ref_sink (g_variant_builder_end (metadata_builder));
 }
index 83000c6e1b6ab6cc4c4578c6bc97d06be93c275f..a7ecd3d0c30310978187f9f4a3bd67f888929f27 100644 (file)
@@ -264,7 +264,6 @@ ostree_builtin_fsck (int argc, char **argv, OstreeCommandInvocation *invocation,
         return FALSE;
     }
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
   if (!opt_quiet)
     g_print ("Validating refs in collections...\n");
 
@@ -282,7 +281,6 @@ ostree_builtin_fsck (int argc, char **argv, OstreeCommandInvocation *invocation,
                                 &found_corruption, cancellable, error))
         return FALSE;
     }
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
   if (!opt_quiet)
     g_print ("Enumerating objects...\n");
@@ -327,13 +325,11 @@ ostree_builtin_fsck (int argc, char **argv, OstreeCommandInvocation *invocation,
               g_autoptr(GVariant) metadata = g_variant_get_child_value (commit, 0);
 
               const char *collection_id = NULL;
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
               if (!g_variant_lookup (metadata,
                                      OSTREE_COMMIT_META_KEY_COLLECTION_BINDING,
                                      "&s",
                                      &collection_id))
                 collection_id = NULL;
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
               g_autofree const char **refs = NULL;
               if (g_variant_lookup (metadata,
@@ -345,7 +341,6 @@ ostree_builtin_fsck (int argc, char **argv, OstreeCommandInvocation *invocation,
                     {
                       g_autofree char *checksum_for_ref = NULL;
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
                       if (collection_id != NULL)
                         {
                           const OstreeCollectionRef collection_ref = { (char *) collection_id, (char *) *iter };
@@ -358,7 +353,6 @@ ostree_builtin_fsck (int argc, char **argv, OstreeCommandInvocation *invocation,
                             return FALSE;
                         }
                       else
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
                         {
                           if (!ostree_repo_resolve_rev (repo, *iter, TRUE,
                                                         &checksum_for_ref, error))
index a4fb5c51304da67401ed92228c55d5a6b70d339d..217bf31009b81b6ecd7a0d52070821b8e967e3b3 100644 (file)
@@ -28,9 +28,7 @@
 #include "ostree.h"
 
 static char *opt_mode = "bare";
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 static char *opt_collection_id = NULL;
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
 /* ATTENTION:
  * Please remember to update the bash-completion script (bash/ostree) and
@@ -39,10 +37,8 @@ static char *opt_collection_id = NULL;
 
 static GOptionEntry options[] = {
   { "mode", 0, 0, G_OPTION_ARG_STRING, &opt_mode, "Initialize repository in given mode (bare, bare-user, bare-user-only, archive)", NULL },
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
   { "collection-id", 0, 0, G_OPTION_ARG_STRING, &opt_collection_id,
     "Globally unique ID for this repository as an collection of refs for redistribution to other repositories", "COLLECTION-ID" },
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
   { NULL }
 };
 
@@ -61,10 +57,8 @@ ostree_builtin_init (int argc, char **argv,OstreeCommandInvocation *invocation,
 
   if (!ostree_repo_mode_from_string (opt_mode, &mode, error))
     goto out;
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
   if (!ostree_repo_set_collection_id (repo, opt_collection_id, error))
     goto out;
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
   if (!ostree_repo_create (repo, mode, NULL, error))
     goto out;
index c34bbf4c02d60f1a554e04b43490cc081942b062..2f560d14b423b6e9021f5fd8045da941fad9b6ad 100644 (file)
@@ -59,9 +59,7 @@ static gboolean
 delete_commit (OstreeRepo *repo, const char *commit_to_delete, GCancellable *cancellable, GError **error)
 {
   g_autoptr(GHashTable) refs = NULL;  /* (element-type utf8 utf8) */
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
   g_autoptr(GHashTable) collection_refs = NULL;  /* (element-type OstreeCollectionRef utf8) */
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
   /* Check refs which are not in a collection. */
   if (!ostree_repo_list_refs (repo, NULL, &refs, cancellable, error))
@@ -73,7 +71,6 @@ delete_commit (OstreeRepo *repo, const char *commit_to_delete, GCancellable *can
         return glnx_throw (error, "Commit '%s' is referenced by '%s'", commit_to_delete, ref);
     }
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
   /* And check refs which *are* in a collection. */
   if (!ostree_repo_list_collection_refs (repo, NULL, &collection_refs,
                                          OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES,
@@ -87,7 +84,6 @@ delete_commit (OstreeRepo *repo, const char *commit_to_delete, GCancellable *can
         return glnx_throw (error, "Commit '%s' is referenced by (%s, %s)",
                            commit_to_delete, ref->collection_id, ref->ref_name);
     }
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
   if (!ot_enable_tombstone_commits (repo, error))
     return FALSE;
index 7c9fa82f64636b90a0d8f0af32a326695e56b9e3..a7f77ac8b428d9225ecae1fbb0b3c245f617bee8 100644 (file)
@@ -31,9 +31,7 @@ static gboolean opt_delete;
 static gboolean opt_list;
 static gboolean opt_alias;
 static char *opt_create;
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 static gboolean opt_collections;
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
 /* ATTENTION:
  * Please remember to update the bash-completion script (bash/ostree) and
@@ -45,13 +43,10 @@ static GOptionEntry options[] = {
   { "list", 0, 0, G_OPTION_ARG_NONE, &opt_list, "Do not remove the prefix from the refs", NULL },
   { "alias", 'A', 0, G_OPTION_ARG_NONE, &opt_alias, "If used with --create, create an alias, otherwise just list aliases", NULL },
   { "create", 0, 0, G_OPTION_ARG_STRING, &opt_create, "Create a new ref for an existing commit", "NEWREF" },
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
   { "collections", 'c', 0, G_OPTION_ARG_NONE, &opt_collections, "Enable listing collection IDs for refs", NULL },
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
   { NULL }
 };
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 static gboolean
 do_ref_with_collections (OstreeRepo    *repo,
                          const char    *refspec_prefix,
@@ -136,7 +131,6 @@ do_ref_with_collections (OstreeRepo    *repo,
  out:
   return ret;
 }
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
 static gboolean do_ref (OstreeRepo *repo, const char *refspec_prefix, GCancellable *cancellable, GError **error)
 {
@@ -147,10 +141,8 @@ static gboolean do_ref (OstreeRepo *repo, const char *refspec_prefix, GCancellab
   gboolean ret = FALSE;
   gboolean is_list;
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
   if (opt_collections)
     return do_ref_with_collections (repo, refspec_prefix, cancellable, error);
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
   /* If we're doing aliasing, we need the full list of aliases mostly to allow
    * replacing existing aliases.
index 281e0df6265244777c0815a8bdd48d939132e8ed..c95c6df091931ff8c291e9b2b2100524ead2b100 100644 (file)
@@ -108,16 +108,11 @@ ostree_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invocati
             return FALSE;
         }
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
       const char *collection_id = ostree_repo_get_collection_id (repo);
-#else  /* if !OSTREE_ENABLE_EXPERIMENTAL_API */
-      const char *collection_id = NULL;
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
       /* Write out a new metadata commit for the repository. */
       if (collection_id != NULL)
         {
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
           OstreeCollectionRef collection_ref = { (gchar *) collection_id, (gchar *) OSTREE_REPO_METADATA_REF };
           g_autofree char *old_ostree_metadata_checksum = NULL;
           g_autofree gchar *new_ostree_metadata_checksum = NULL;
@@ -192,10 +187,6 @@ ostree_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invocati
 
           if (!ostree_repo_commit_transaction (repo, NULL, cancellable, error))
             return FALSE;
-#else  /* if !OSTREE_ENABLE_EXPERIMENTAL_API */
-          g_assert_not_reached ();
-          return FALSE;
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
         }
 
       /* Regenerate and sign the conventional summary file. */
index b79bf589100d9adf9ca07d2d2478e6a0039b6c07..7a7d41bc5498582744af6b13ae3976735c2ff49b 100644 (file)
@@ -39,10 +39,8 @@ BUILTINPROTO(checksum);
 BUILTINPROTO(commit);
 BUILTINPROTO(diff);
 BUILTINPROTO(export);
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 BUILTINPROTO(find_remotes);
 BUILTINPROTO(create_usb);
-#endif
 BUILTINPROTO(gpg_sign);
 BUILTINPROTO(init);
 BUILTINPROTO(log);
index 4d90934c152083f12c06c4619dd7dbefba5d7955..8b339dbd6cd4bcc6ebc76420dae9cd7e30db74cd 100644 (file)
@@ -32,9 +32,7 @@ static gboolean opt_no_gpg_verify;
 static gboolean opt_if_not_exists;
 static char *opt_gpg_import;
 static char *opt_contenturl;
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
 static char *opt_collection_id;
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 static char *opt_sysroot;
 static char *opt_repo;
 
@@ -49,10 +47,8 @@ static GOptionEntry option_entries[] = {
   { "if-not-exists", 0, 0, G_OPTION_ARG_NONE, &opt_if_not_exists, "Do nothing if the provided remote exists", NULL },
   { "gpg-import", 0, 0, G_OPTION_ARG_FILENAME, &opt_gpg_import, "Import GPG key from FILE", "FILE" },
   { "contenturl", 0, 0, G_OPTION_ARG_STRING, &opt_contenturl, "Use URL when fetching content", "URL" },
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
   { "collection-id", 0, 0, G_OPTION_ARG_STRING, &opt_collection_id,
     "Globally unique ID for this repository as an collection of refs for redistribution to other repositories", "COLLECTION-ID" },
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
   { "repo", 0, 0, G_OPTION_ARG_FILENAME, &opt_repo, "Path to OSTree repository (defaults to /sysroot/ostree/repo)", "PATH" },
   { "sysroot", 0, 0, G_OPTION_ARG_FILENAME, &opt_sysroot, "Use sysroot at PATH (overrides --repo)", "PATH" },
   { NULL }
@@ -133,11 +129,9 @@ ot_remote_builtin_add (int argc, char **argv, OstreeCommandInvocation *invocatio
                            "gpg-verify",
                            g_variant_new_variant (g_variant_new_boolean (FALSE)));
 
-#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
   if (opt_collection_id != NULL)
     g_variant_builder_add (optbuilder, "{s@v}", "collection-id",
                            g_variant_new_variant (g_variant_new_take_string (g_steal_pointer (&opt_collection_id))));
-#endif  /* OSTREE_ENABLE_EXPERIMENTAL_API */
 
   options = g_variant_ref_sink (g_variant_builder_end (optbuilder));